package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: Scanner
 * User: Li_yizYa
 * Date: 2025/5/8
 * Time: 17:39
 */
public class Demo16 {
    public static void main(String[] args) {
        try (InputStream inputStream = new FileInputStream("./test.txt")) {
            Scanner scanner = new Scanner(inputStream);
            while (scanner.hasNextInt()) {
                System.out.println(scanner.nextInt());
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
